package com.hera.process.config.dao;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.hera.base.dao.repository.BaseRepository;
import com.hera.process.config.domain.BusinessHour;
import com.hera.process.config.domain.BusinessHourPK;

public interface BusinessHourDao extends BaseRepository<BusinessHour, BusinessHourPK> {

	@Modifying
	@Transactional
	@Query("delete from BusinessHour o where o.businessHourPK.idCalendar = ?")
	void deleteByCalendar(Long idCalendar);
}
